Module: client/trpcClient
Variables
trpc
• Const
trpc: CreateTRPCReactBase
<CreateRouterInner
<RootConfig
<>, { draft
: CreateRouterInner
<RootConfig
<>, { deleteDraft
: BuildProcedure
<"mutation"
, , GetResult
<, unknown
> & > ; getDraft
: BuildProcedure
<"query"
, , { data
: Record
<string
, unknown
> ; formId
: string
; userId
: string
}> ; upsertDraft
: BuildProcedure
<"mutation"
, , GetResult
<, unknown
> & > }> = draftRouter; formResults
: CreateRouterInner
<RootConfig
<>, { getFormResults
: BuildProcedure
<"query"
, , { data
: { submission
: ... | ... ; task
: ... | ... }[] ; totalCount
: number
}> }> = formResultsRouter; task
: CreateRouterInner
<RootConfig
<>, { createTask
: BuildProcedure
<"mutation"
, , TaskWithDeadline
> ; deleteTask
: BuildProcedure
<"mutation"
, , void
> ; getTask
: BuildProcedure
<"query"
, , TaskWithDeadline
> ; listTasks
: BuildProcedure
<"query"
, , { count
: number
; data
: TaskWithDeadline
[] }> }> = taskRouter }>, unknown
> & DecoratedProcedureRecord
<{ draft
: CreateRouterInner
<RootConfig
<>, { deleteDraft
: BuildProcedure
<"mutation"
, , GetResult
<, unknown
> & > ; getDraft
: BuildProcedure
<"query"
, , { data
: Record
<string
, unknown
> ; formId
: string
; userId
: string
}> ; upsertDraft
: BuildProcedure
<"mutation"
, , GetResult
<, unknown
> & > }> = draftRouter; formResults
: CreateRouterInner
<RootConfig
<>, { getFormResults
: BuildProcedure
<"query"
, , { data
: { submission
: null
| Submission
; task
: null
| TaskWithDeadline
}[] ; totalCount
: number
}> }> = formResultsRouter; task
: CreateRouterInner
<RootConfig
<>, { createTask
: BuildProcedure
<"mutation"
, , TaskWithDeadline
> ; deleteTask
: BuildProcedure
<"mutation"
, , void
> ; getTask
: BuildProcedure
<"query"
, , TaskWithDeadline
> ; listTasks
: BuildProcedure
<"query"
, , { count
: number
; data
: TaskWithDeadline
[] }> }> = taskRouter }, null
, ""
>
TRPC client instance.
Defined in
src/web-app/src/client/trpcClient.tsx:38
Functions
ClientProvider
▸ ClientProvider(props
): Element
Wrap the whole app in this provider to use trpc.
Parameters
Name | Type | Description |
---|---|---|
props | Object | Props object. |
props.children | ReactNode | Child elements. |
Returns
Element